package main

import "golang.org/x/tour/pic"
import "image"
import "image/color"

type Image struct{
	w int
	h int
}

func (ig Image) Bounds() image.Rectangle{
	return image.Rect(0,0,ig.w,ig.h)
}

func (ig Image) ColorModel() color.Model{
	return color.RGBAModel
}

func (ig Image) At(x,y int) color.Color{
   v := uint8(x^y) 
	return color.RGBA{v,v,uint8(255),uint8(255)}
}

func main() {
	m := Image{200,200}
	pic.ShowImage(m)
}